#pragma once

#include <jni.h>


extern JNIEnv * gJavaEnv;


struct JavaMethodCacheMusic
{
	jclass main_class;
	jobject main_object;
	jmethodID play_music;
	jmethodID set_volume;
	
	JavaMethodCacheMusic()
	:	main_class(0),
		main_object(0),
		play_music(0),
		set_volume(0)
	{}

	~JavaMethodCacheMusic()
	{
		if ( main_class )
		    gJavaEnv->DeleteLocalRef( main_class );

		if ( main_object )
		    gJavaEnv->DeleteLocalRef( main_object );
	}
};

extern JavaMethodCacheMusic *method_cache_music;

void check_method_cache_music();
